<?php
/**
+++-----products与products_descripiton关联
*/
class ProductsViewModel extends ViewModel{
	
	public $viewFields = array(
		'products'=>array('*','_as'=>'p'),
		//'products_description'=>array('*','_as'=>'pd','_on'=>'p.products_id=pd.products_id'),
		
	);
	//獲取所有信息
   public function getAll($where,$limit,$order){
		 return $this->where($where)->limit($limit)->order($order)->select();
		// echo $this->getLastSql();die;
	}
  //獲取一條信息
   public function getOne($where){
		return $this->where($where)->find();
	}
		
} 

?>